Adding State and Visibility Control to Traits Using Lexical Nesting

نویسندگان

  • Tom Van Cutsem
  • Alexandre Bergel
  • Stéphane Ducasse
  • Wolfgang De Meuter
چکیده

Traits are reusable building blocks that can be explicitly composed to share methods across unrelated class hierarchies. In their original form, traits do not contain state and cannot express visibility control for methods. Two extensions, stateful traits and freezable traits, have been proposed to overcome these limitations. However, these extensions introduce complexity and have not yet been combined to add both state and visibility control to traits at the same time. This paper revisits the problem of adding state and visibility control to traits. Rather than extending the original traits model with additional operations, we use a fundamentally different approach by allowing traits to be lexically nested within other modules. This enables traits to express (shared) state and visibility control by hiding variables or methods in their lexical scope. Although the Traits’ “flattening property” no longer holds when traits can be lexically nested, the combination of traits with lexical nesting results in a simple and more expressive trait model. We formally specify the operational semantics of this combination. Lexically nested traits are fully implemented in AmbientTalk, where they are used among others in the development of a Morphic-like UI framework.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Effects of Different Levels of Dried Lemon (Citrus aurantifulia) Pulpon Performance, Carcass Traits, Blood Biochemical and Immunity Parameters of Broilers

This experiment was conducted to evaluate the effects of different levels of dried lemon pulp (DLP) on performance, carcass traits, blood biochemical and immunity parameters of broilers. In this experiment 240 of broilers (Ross-308) were used in a completely randomized design with 4 treatments and 3 replicates (with 20 birds in each replicate) from 1 to 42 days. Experimental diets included: 1) ...

متن کامل

Effects of Adding Ethanol Extract of Propolis and Cumin Essential Oil to Diet on the Performance, Blood Parameters, Immune Response and Carcass Traits of Broiler Chicks

This study was conducted to determine the effects of adding ethanol extract of propolis (EEP) and cumin essential oil (CEO) to diets of broiler chicks on the performance, blood parameters, immune response and carcass traits. A total of 240 day-old Ross-308 broiler chicks were randomly allocated to four treatments with six replicates and 10 birds in each replicate in a completely randomized desi...

متن کامل

The impact of using problem-solving puzzles on Iranian intermediate EFL learners' lexical knowledge

This study tried to investigate the impact of using problem-solving puzzles onIranian Intermediate EFL learners' lexical knowledge. At first a homogenoussample of 30 Intermediate EFL learners attending in the third grade of Shahedhigh school in Lahijan were selected and they were randomly divided into twogroups, as experimental group and control group. In the first session, the pretestwas admin...

متن کامل

Effect of Nesting on Extensor Motor Behaviors in Preterm Infants: A Randomized Clinical Trial

Background: The aim of this study was to investigate the effect of bedding preterm infants in nests on their motor behaviors in a neonatal intensive care unit (NICU) in Iran.Methods: In this randomized controlled trial, 44 clinically stable preterm infants, admitted to the NICU, were recruited and randomly divided into two groups of control and intervention. The routine of the unit was to...

متن کامل

Demonstration of Multi Statutory of the Adjective “Just” in Modern Adjectival English Lexicon

This article concerns the general functional features of an adjective in modern English, and in particular multistate lexical item “just”, which carries different meanings in different variants of combinatorics. The authors analyze the combinations used with the adjectival lexeme item “just” and reveal the categories that determine the degree of semantic content of each given statement. The nee...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2009